package fianlExperiment.cn.edu.scau.cmi.linyuetao.linyuetao;

import javafx.fxml.FXML;
import javafx.scene.image.ImageView;
import javafx.stage.Stage;

public class Controller {
	@FXML
	ImageView image;

	public ImageView getImage() {
		return image;
	}

	public void setImage(ImageView image) {
		this.image = image;
	}
	
	@FXML
	public void singleton(){
		Stage stage = new Stage();
		cn.edu.scau.cmi.linyuetao.singleton.Main main = new cn.edu.scau.cmi.linyuetao.singleton.Main();
		try {
			main.start(stage);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	
	@FXML
	public void simpleFactory(){
		Stage stage = new Stage();
		cn.edu.scau.cmi.linyuetao.abstractFactory.Main main = new cn.edu.scau.cmi.linyuetao.abstractFactory.Main();
		try {
			main.start(stage);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	
	@FXML
	public void factory(){
		Stage stage = new Stage();
		cn.edu.scau.cmi.linyuetao.abstractFactory.Main2 main = new cn.edu.scau.cmi.linyuetao.abstractFactory.Main2();
		try {
			main.start(stage);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	
	@FXML
	public void abstractFactory(){
		Stage stage = new Stage();
		cn.edu.scau.cmi.linyuetao.abstractFactory.Main3 main = new cn.edu.scau.cmi.linyuetao.abstractFactory.Main3();
		try {
			main.start(stage);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	
	@FXML
	public void adapter(){
		Stage stage = new Stage();
		cn.edu.scau.cmi.linyuetao.adapter.Client main = new cn.edu.scau.cmi.linyuetao.adapter.Client();
		try {
			main.start(stage);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	
	@FXML
	public void safeComposite(){
		Stage stage = new Stage();
		cn.edu.scau.cmi.linyuetao.composite.Client1 main = new cn.edu.scau.cmi.linyuetao.composite.Client1();
		try {
			main.start(stage);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	
	@FXML
	public void consistentComposite(){
		Stage stage = new Stage();
		cn.edu.scau.cmi.linyuetao.composite.Client2 main = new cn.edu.scau.cmi.linyuetao.composite.Client2();
		try {
			main.start(stage);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	
	@FXML
	public void hibernate(){
		Stage stage = new Stage();
		cn.edu.scau.cmi.linyuetao.hibernate.Client main = new cn.edu.scau.cmi.linyuetao.hibernate.Client();
		try {
			main.start(stage);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	
	@FXML
	public void spring(){
		Stage stage = new Stage();
		cn.edu.scau.cmi.linyuetao.spring.SpringClient main = new cn.edu.scau.cmi.linyuetao.spring.SpringClient();
		try {
			main.start(stage);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
